package com.maybach.workflow.common.api;

import java.util.Map;

/**
 * Created by houenxun on 15/10/19.
 */
public class ContextPreparerStrategy implements IContextPreparer {
    private Map<String, IContextPreparer> preparerMap ;
    @Override
    public WorkFlowContext fillContext(WorkFlowContext context) {
        return preparerMap.get(context.getBizType()).fillContext(context);
    }

    public Map<String, IContextPreparer> getPreparerMap() {
        return preparerMap;
    }

    public void setPreparerMap(Map<String, IContextPreparer> preparerMap) {
        this.preparerMap = preparerMap;
    }
}
